<?php $db = JFactory::getDBO();
	$query = "SELECT introtext FROM #__content WHERE id = 19";
	$db->setQuery($query);
	$intro = $db->loadResult();
	
	$query = "SELECT id, name, alias FROM #__pr_category WHERE parent_id = 0";
	$db->setQuery($query);
	$cats = $db->loadObjectList();
?>
<div class="main-content clear-fix" id="intro-page">
    <div class="content-full">
        <div id="intro-text">
            <h2>Velkommen til Dansk<span>cafe</span>service</h2>
            <?php echo $intro;?>
            <div id="intro-button" class="clear-fix">
                <a href="index.php?option=com_ecommerce&view=promotion&Itemid=20" id="intro-offer">Ugens slagtilbud</a>
                <a href="index.php?option=com_ecommerce&view=orders&Itemid=17" id="intro-history">Mine bestillinger</a>
            </div>
            <div id="intro-category">
                <ul>
                	<?php foreach($cats as $cat){
						$cat_link = "index.php?option=com_ecommerce&view=category&catid=".$cat->id.":".$cat->alias."&Itemid=16";
					?>
                    <li><a href="<?php echo $cat_link?>"><?php echo $cat->name;?></a></li>
                    <?php }?>
                </ul>
                <div class="clear"></div>
            </div>
        </div>
    </div>
</div>